﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace Admin.EntityFrameworkCore
{
    public class AdminDbContextFactory : IDesignTimeDbContextFactory<AdminDbContext>
    {
        public AdminDbContext CreateDbContext(string[] args)
        {
            var builder = new DbContextOptionsBuilder<AdminDbContext>();
            builder.UseSqlite("Data Source=AdminDb.sqlite");
            //builder.UseSqlServer("Server=(localdb)\\mssqllocaldb; Database=AdminDb; Trusted_Connection=True;");
            return new AdminDbContext(builder.Options);
        }
    }
}